//  人脸识别信息填写控制模块
import {
    viewInit,
    djsfunc
} from '../views/infoView.js';


var $verifyBtn, $phone, $verification_code, $name, $submit_btn,$frId;
$(document).on("pageinit", "#infoPage", controllerInit);

// 控制器初始化
function controllerInit() {
    initValue();
    viewInit();
    bindEvent();
}

//
function submitFuc () {
    if($submit_btn.hasClass("weui-btn_disabled")){
        return;
    }else{
        sessionStorage.setItem("face_name",$name.val());
        sessionStorage.setItem("face_id",$frId.val());
        sessionStorage.setItem("face_phone",$phone.val());
        location.href = "./faceDetect.html";
    }
}


//
function smsCallBack(msgData) {
    console.dir(msgData);
}

// 绑定事件
function bindEvent() {
    $submit_btn.on("touchend",submitFuc);
}

// 变量初始化
function initValue() {
    $verifyBtn = $("#verifyBtn");
    $phone = $("#phone");
    $verification_code = $("#verification_code");
    $name = $("#name");
    $submit_btn = $("#submit_btn");
    $frId = $("#frId");
}
